package com.yuandian.api.business_monitor.feign;

import com.yuandian.api.business_monitor.po.AlarmParams;
import com.yuandian.api.business_monitor.vo.AlarmProportionVo;
import com.yuandian.bpm.common.core.util.R;
import com.yuandian.utils.PageDataInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 说明：业务告警归并查询接口，提供给运维工作台远程调用
 * @author LinShiHe
 * @Date 2023/3/14 16:06
 */
@FeignClient(contextId = "RemoteAlarmMergingQueryService", value = "bpm-business-monitor")
public interface RemoteAlarmMergingQueryService {


	/**
	 * 按照系统ID、业务编码及时间范围分类统计各类型告警(环形图)
	 * @param params  查询参数
	 * @return 返回通用结果集
	 */
	@PostMapping("/alarm/business/getBusinessAlarmPercent")
	R<List<AlarmProportionVo>> getBusinessAlarmPercent(@RequestBody AlarmParams params);


	/**
	 * 按照系统ID、业务编码及时间范围分类统计各等级告警(环形图)
	 * @param params  查询参数
	 * @return 返回通用结果集
	 */
	@PostMapping("/alarm/business/getBusinessAlarmLevelPercent")
	R<List<AlarmProportionVo>> getBusinessAlarmLevelPercent(@RequestBody AlarmParams params);


	/**
	 * 按照系统ID、业务编码、时间范围、端口ID查询各告警对应 不同等级 的告警总数列表
	 * @param params  查询参数（系统ID、业务编码、时间范围、端口ID）
	 * @return 返回通用结果集
	 */
	@PostMapping("/alarm/business/getBusinessGradeDate")
	R<PageDataInfo> getBusinessGradeDate(@RequestBody AlarmParams params);


	/**
	 * 按照系统ID、业务编码、时间范围、端口ID和告警类型id查询各告警详情列表
	 * @param params  查询参数（系统ID、业务编码、时间范围、端口ID）
	 * @return 返回通用结果集
	 */
	@PostMapping("/alarm/business/getBusinessAlarmList")
	R<PageDataInfo> getBusinessAlarmList(@RequestBody AlarmParams params);
}
